﻿using System;
using System.Diagnostics.Contracts;

namespace Library.Linq
{
    public interface IAggregate<T>
    {
        [Pure]
        T Aggregate(Func<T, T, T> func);
        [Pure]
        TAccumulate Aggregate<TAccumulate>(TAccumulate seed, Func<TAccumulate, T, TAccumulate> func);
        [Pure]
        TResult Aggregate<TAccumulate, TResult>(TAccumulate seed, Func<TAccumulate, T, TAccumulate> func, Func<TAccumulate, TResult> resultSelector);
    }
}
